package com.czr.dao.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;

/**
 * <p>
 * 名企推荐
 * </p>
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("czr_company")
@ApiModel(value="czr_company对象", description="名企推荐")
public class CzrCompany extends Model<CzrCompany> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键(申请不用传，修改时传)")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "企业名称")
    @NotEmpty(message = "企业名称不能为空！")
    @TableField("company_name")
    private String companyName;

    @ApiModelProperty(value = "经营范围")
    @TableField("company_business")
    private String companyBusiness;

    @ApiModelProperty(value = "企业简介(传编辑器中html)")
    @TableField("company_brief")
    private String companyBrief;

    @ApiModelProperty(value = "作品案例(传编辑器中html)")
    @TableField("company_case")
    private String companyCase;

    @ApiModelProperty(value = "联系我们(传编辑器中html)")
    @TableField("company_contact")
    private String companyContact;

    @ApiModelProperty(value = "是否首页推荐 0 否 1是")
    @TableField("is_recommend")
    private Integer isCecommend;


    @ApiModelProperty(value = "入库时间")
    @TableField("insert_time")
    private String insertTime;

    @ApiModelProperty(value = "状态 0正常 -1删除")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "h5封面(传上传后返回的文件名称)")
    @TableField("h5_logo")
    private String h5Logo;

    @ApiModelProperty(value = "pc封面(传上传后返回的文件名称)")
    @TableField("pc_logo")
    private String pcLogo;

    @ApiModelProperty(value = "入库人（不用传）")
    @TableField("userId")
    private Integer userId;

    @ApiModelProperty(value = "排序字段（数值）")
    @TableField("company_sort")
    private Integer companySort;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
